import request from '@/utils/request'

// 查询方案主列表
export function listPlan(query) {
    return request({
        url: '/plan/plan/list',
        method: 'get',
        params: query
    })
}
//新方案
export function newlist(query) {
    return request({
        url: '/plan/plan/newlist',
        method: 'get',
        params: query
    })
}
//指定日期
export function holidayBillingList(query) {
    return request({
        url: '/plan/plan/specifiedlist',
        method: 'get',
        params: query
    })
}
// 查询方案主详细
export function getPlan(planId) {
    return request({
        url: '/plan/plan/' + planId,
        method: 'get'
    })
}

// 新增方案主
export function addPlan(data) {
    return request({
        url: '/plan/plan',
        method: 'post',
        data: data
    })
}

// 修改方案主
export function updatePlan(data) {
    return request({
        url: '/plan/plan',
        method: 'put',
        data: data
    })
}

// 删除方案主
export function delPlan(planId) {
    return request({
        url: '/plan/plan/' + planId,
        method: 'delete'
    })
}

// 导出方案主
export function exportPlan(query) {
    return request({
        url: '/plan/plan/export',
        method: 'get',
        params: query
    })
}

export function getTenantConfig(query) {
    return request({
        url: '/plan/plan/getTenantConfig',
        method: 'get',
        params: query
    })
}

// 车型业务配置列表
export function configurationList(query) {
    return request({
        url: '/plan/plan/configurationList',
        method: 'get',
        params: query
    })
}

// 节假日
export function holidayList(query) {
    return request({
        url: '/plan/plan/holidayList',
        method: 'get',
        params: query
    })
}
// 节假日
export function getSpecialDateByAdd(query) {
    return request({
        url: '/plan/date/getSpecialDateByPlanAdd',
        method: 'get',
        params: query
    })
}

// 收费项
export function chargeItemsList(query) {
    return request({
        url: '/plan/plan/chargeItemsList',
        method: 'get',
        params: query
    })
}

// 套餐
export function mealList(query) {
    return request({
        url: '/plan/plan/mealList',
        method: 'get',
        params: query
    })
}
// 启停用
export function stopUsingEnabled(data) {
    return request({
        url: '/plan/plan/stopUsingEnabled',
        method: 'put',
        data: data
    })
}


export function insertPlan(data) {
    return request({
        url: '/plan/plan/insertPlan',
        method: 'post',
        data: data
    })
}

export function getNewInfo(planId) {
    return request({
        url: '/plan/plan/getNewInfo/' + planId,
        method: 'get',
    })
}

export function updatePlan2(data) {
    return request({
        url: '/plan/plan/updatePlan',
        method: 'put',
        data: data
    })
}

export function updateDayAmountPlan(data) {
    return request({
        url: '/plan/plan/updateDayAmountPlan',
        method: 'put',
        data: data
    })
}

export function updatespecifiedAmountPlan(data) {
    return request({
        url: '/plan/plan/updatespecifiedAmountPlan',
        method: 'put',
        data: data
    })
}
